import request from '@/utils/request'

// 封装注册接口

export function Register(data) {
  return request.post('/auth/local/register', data)
}

// 封装登录接口
export function Login(data) {
  return request.post('/auth/local', data)
}

// 封装获取当前用户信息
export function getUserInfo() {
  return request.get('/users/me')
}

// 封装当前用户权限
export function getMyPermissions(){
  return request({
    method:'get',
    url:`/mypermissions`
  })
}